﻿<Window x:Class="Twc.Deployment.Client.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Twc.Deployment.Client.ViewModel"
    Title="TWC Deployment Tool" Height="651" Width="557">
    <Window.DataContext>
        <local:DeploymentViewModel DeployWebConfig="True"  DeployWSP="True" RestoreDB="True" Enabled="True"/>
    </Window.DataContext>
    <Grid >
        <Grid IsEnabled="{Binding Path=Enabled}">
            <ComboBox DisplayMemberPath="Name" Height="23" Margin="96,48,139,0" Name="cmbxWebApplication" VerticalAlignment="Top" ItemsSource="{Binding Path=WebApplications}" SelectedItem="{Binding Path=WebApplication}" />
            <ComboBox Height="23" Margin="96,82,139,0" Name="cmbxSiteCollection" VerticalAlignment="Top" ItemsSource="{Binding Path=WebApplication.SiteCollections}"  DisplayMemberPath="Url" SelectedItem="{Binding Path=SiteCollection}" />
            <GroupBox Header="Deployment Options" Margin="10,114,0,0" Name="gbxDeploymentOptions" HorizontalAlignment="Left" Width="186" Height="101" VerticalAlignment="Top">
                <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="36*" />
                        <ColumnDefinition Width="152*" />
                    </Grid.ColumnDefinitions>
                    <CheckBox Height="16" Margin="10,11,58,0" Name="cbxDeployWSP" VerticalAlignment="Top" Grid.ColumnSpan="2" IsChecked="{Binding Path=DeployWSP}">WSP</CheckBox>
                    <CheckBox Margin="10,33,58,32" Name="cbxRestoreSPBackup" Grid.ColumnSpan="2" IsChecked="{Binding Path=RestoreDB}">SharePoint backup</CheckBox>
                    <CheckBox Height="16" Margin="10,0,58,10" Name="cbxDeployWebConfig" VerticalAlignment="Bottom" Grid.ColumnSpan="2" IsChecked="{Binding Path=DeployWebConfig}" IsEnabled="False">Web.config</CheckBox>
                </Grid>
            </GroupBox>
            <Label Height="28" HorizontalAlignment="Left" Margin="12,46,0,0" Name="lblWebAppplication" VerticalAlignment="Top" Width="120">WebApplication</Label>
            <Label Height="28" HorizontalAlignment="Left" Margin="12,80,0,0" Name="lblSiteCollection" VerticalAlignment="Top" Width="120">Site collection</Label>
            <Button HorizontalAlignment="Right" Margin="0,192,9,0" Name="btnDeploy" Width="75" Click="btnDeploy_Click" Height="23" VerticalAlignment="Top">Deploy</Button>
            <Label Content="{Binding Title}" Height="Auto" Margin="10,7,8,0" Name="lblTitle" VerticalAlignment="Top" FontSize="20"></Label>
        </Grid>
        <GroupBox Header="Console" Margin="11,225,9,13" Name="grbxConsole">
            <ScrollViewer Name="scrollViewer1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                <Label Content="{Binding Path=Console}" Height="Auto" Name="lblConsole" Width="Auto" />
            </ScrollViewer>
        </GroupBox>
    </Grid>

</Window>
